from django.core.management import BaseCommand

from user.models import *


class Command(BaseCommand):
    help = 'create_user_company'

    def handle(self, *args, **options):
        user = User.objects.create_user(username='12345678901', phone='12345678901', name='boss',
                                        password='bfd81ee3ed27ad31c95ca75e21365973')
        r = Role.objects.create(sign='3')
        r.user.add(user)
        self.stdout.write(self.style.SUCCESS('Create user data success'))
